package com.chilly.lambda.constructor;

/**
 * 构造函数是如何使用 ::关键字来引用的
 *
 * Created by Chilly Cui on 2020/11/19.
 */
public class Main {
    public static void main(String[] args) {
        //Person::new 来获取Person类构造函数的引用
        PersonFactory<Person> personFactory = Person::new;
        Person person = personFactory.create("perter", "kru");
        System.out.println(person);
    }
}
